تحويل الصورة من الالوان الى اللون الرمادي
Command1 اضف التالي في حدث النقر على زر
Private Sub
Command1_Click()
Picture1.ScaleMode = vbPixels
x =
Picture1.ScaleWidth
y = Picture1.ScaleHeight
For i = 0 To y - 1
For j =
0 To x - 1
pixel = Picture1.Point(j, i)
red = pixel Mod 256
green =
((pixel And &HFF00) / 256) Mod 256
blue = (pixel And &HFF0000) /
65536
g = ((red * 30) + (green * 60) + (blue * 20)) / 100
Picture1.PSet
(j, i), RGB(g, g, g)
Next
Next
Picture1.ScaleMode = vbTwips
End
Sub